refactor: remove deprecated result types and compat shims#157
refactor: remove deprecated result types and compat shims#157jsonbailey wants to merge 1 commit intomainfrom
Conversation
9c0003c to
1aa1069
Compare
4966c51 to
1b3a1ba
Compare
1aa1069 to
f811cf8
Compare
1b3a1ba to
cd04edb
Compare
f811cf8 to
e56ea8f
Compare
cd04edb to
de96fcd
Compare
e56ea8f to
4e0b78d
Compare
de96fcd to
33bcaa7
Compare
4e0b78d to
c1c2c8c
Compare
33bcaa7 to
bccb5bc
Compare
c1c2c8c to
a233c2f
Compare
bccb5bc to
c2d054f
Compare
a233c2f to
a770b1f
Compare
c2d054f to
c083c3d
Compare
a770b1f to
069c0ee
Compare
c083c3d to
f0c6494
Compare
069c0ee to
1c0255f
Compare
f0c6494 to
769815c
Compare
1c0255f to
0355872
Compare
769815c to
19e344d
Compare
0355872 to
796bda5
Compare
19e344d to
0374773
Compare
796bda5 to
a2db8cb
Compare
0374773 to
6677156
Compare
7aae3e2 to
1e61d42
Compare
6677156 to
3867b8f
Compare
…esult and compat shims
3867b8f to
87007b9
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 87007b9. Configure here.
| :param messages: Array of LDMessage objects representing the conversation | ||
| :return: ModelResponse containing the model's response and metrics | ||
| """ | ||
| ... |
There was a problem hiding this comment.
ModelRunner protocol is dead code after migration
Low Severity
The ModelRunner protocol defines invoke_model but nothing in the codebase calls this method or type-checks against this protocol. Both OpenAIModelRunner and LangChainModelRunner implement Runner (with its run method), not ModelRunner. The managed layer exclusively uses Runner. Implementing ModelRunner alone would not satisfy the Runner protocol the SDK requires, making this export misleading and effectively dead code that outlived its purpose during the migration.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 87007b9. Configure here.


Removes the deprecated result types (
ModelResponse,StructuredResponse,AgentResult) and associated compat shims now that all runner implementations have migrated to theRunnerprotocol.Stacked on #150 (LangChain runner migration).
Changes
ModelResponse,StructuredResponse,AgentResultfromproviders/types.pyModelRunner-related compat frommanaged_model.pyandmanaged_agent.pyai_provider.pyandmodel_runner.py🤖 Generated with Claude Code
Note
Medium Risk
Medium risk because this removes deprecated public types/exports and changes protocol return types (
ModelRunner/AgentRunner) toRunnerResult, which can break downstream imports and provider implementations.Overview
Removes the deprecated response/result dataclasses
ModelResponse,StructuredResponse, andAgentResultand drops their re-exports fromldai/ldai.providers.Unifies runner protocols around
RunnerResult:AgentRunner.run()andModelRunner.invoke_model()now returnRunnerResult, andAIProviderno longer includes legacyinvoke_model/invoke_structured_modelshims;ManagedModelis updated to type the tracked run result asRunnerResult.Reviewed by Cursor Bugbot for commit 87007b9. Bugbot is set up for automated code reviews on this repo. Configure here.